package com.xszx.serviceedu.client;

import com.xszx.commonutils.R;
import com.xszx.serviceedu.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: 白熊
 * @Date: 2024/7/19 16:44
 */
@Component
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)//指定从哪个服务中调用功能,从nacos服务器中看
public interface VodClient {
    @DeleteMapping(value = "/vod/video/voidId")
    R removeVideo(@PathVariable("voidId") String voidId);//path注解里面必须和路径参数一致

    @DeleteMapping("/vod/video/deleteBatch")
    R removeVideoList(@RequestParam("videoIdList") List<String> videoIdList);

}
